competitive coding in javascript